import request from '@/utils/request'

// 查询树形字典类型列表
export function listTree(query) {
  return request({
    url: '/system/tree/list',
    method: 'get',
    params: query
  })
}

// 查询树形字典类型详细
export function getTree(dictId) {
  return request({
    url: '/system/tree/' + dictId,
    method: 'get'
  })
}

// 新增树形字典类型
export function addTree(data) {
  return request({
    url: '/system/tree',
    method: 'post',
    data: data
  })
}

// 修改树形字典类型
export function updateTree(data) {
  return request({
    url: '/system/tree',
    method: 'put',
    data: data
  })
}

// 删除树形字典类型
export function delTree(dictId) {
  return request({
    url: '/system/tree/' + dictId,
    method: 'delete'
  })
}

// 导出树形字典类型
export function exportTree(query) {
  return request({
    url: '/system/tree/export',
    method: 'get',
    params: query
  })
}